# -*- coding: utf-8 -*-
# @Time    : 2022/7/16 14:36
# @Author  : catherine
# @Email   : catherine_csq@163.com
# @File    : clue_info_page.py
# @Software: PyCharm
from selenium.webdriver.common.by import By

from pages.base_page import BasePage


class ClueInfoPage(BasePage):
    '''线索页面类'''
    url='http://192.168.189.1:8081/crm/index.php?m=leads&a=view&id=42'
    delete_clue_locator = (By.LINK_TEXT, '删除')

    def click_delete_clue(self):
        '''删除线索'''
        self.find_element(self.delete_clue_locator).click()
        self.driver.switch_to.alert.accept()